import { createApp } from 'vue'
import './style.scss'
// 样式初始化
import 'normalize.css'
// element plus
import ElementPlus from "element-plus";
// element icons
import * as Icons from "@element-plus/icons-vue";
import App from './App.vue'
import router from './routers'
import pinia from './stores'
// errorHandler
import errorHandler from "./utils/errorHandler";

const app = createApp(App)

// register the element Icons component
Object.keys(Icons).forEach(key => {
    app.component(key, Icons[key as keyof typeof Icons]);
});

app.config.errorHandler = errorHandler;

app.use(ElementPlus)
    .use(pinia)
    .use(router)
    .mount('#app')
